package leetcode.code191.Numberof1Bits;

public class Solution19101 extends Numberof1Bits {

	@Override
	public int hammingWeight(int n) {
		int count = 0;
		while (n != 0) {
			if ((n & 1) == 1) {
				count++;
			}
			n >>>= 1;
		}
		return count;
	}

	public static void main(String[] args) {
		Solution19101 so = new Solution19101();
		so.debug1();
		so.debug2();
		so.debug3();
		so.debug4();
//		int num = -1;
//		String s= Integer.toBinaryString(-1);
//		System.out.println(s);
	}

}
